<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        div{
            width: 100px;
            height: 100px;

            display: inline-block;
            display: inline;
        }

        .div1{
            background-color: red;
        }

        .div2 {
            background-color: green;
        }

        span {
            width: 200px;
            height: 200px;
            display: block;
            display: inline-block;
        }

        .span1 {
            background-color: red;
        }

        .span2 {
            background-color: green;
        }

        img {
            width: 100px;
            height: 100px;
            display: block;
        }
    </style>
</head>
<body>
    <!-- 块级元素:独占一行,默认宽度是父级的100%,可以设置宽高 -->
    <div class="div1">div 标签1</div>
    <div class="div2">div 标签2</div>

    <!-- 行内元素:一行可以共存多个;尺寸由内容撑开,加宽高不生效 -->
     <span class="span1">sapn1111</span>
     <span class="span2">span</span>

     <!-- 行内块元素:一行共存多个,默认尺寸由内容撑开,加宽高生效 -->
      <img src="./images/1.png" alt="">
      <img src="./images/1.png" alt="">
</body>
</html>